﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using DataAccess;
using Common;

namespace BusinessLogic
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "ElectrosWCF" in code, svc and config file together.
    public class ElectrosWCF : IElectrosWCF
    {
        public IEnumerable<Common.Menu> GetMenu(int roleID)
        {
            return new ElectrosRepository().GetMenu(roleID);
        }

        public int RandomGenerator()
        {
            return new ElectrosRepository().RandomGenerator();
        }

        public void sendEmailNotification(string username, string bodyContent, string subject)
        {
            new ElectrosRepository().sendNotificationEmail(username, bodyContent, subject);
        }

        public string DecryptPassword(string vl, string key)
        {
            return new ElectrosRepository().DecryptPassword(vl, key);
        }

        public void SendEmail(string email, string username, Fault f)
        {
            new ElectrosRepository().SendEmail(email, username, f);
        }

        public string CreatePDFFault(Fault fault)
        {
            return new ElectrosWCF().CreatePDFFault(fault);
        }


    }
}
